#include <asm/asm.h>
#include <asm/regdef.h>
#include <cpu.h>
#include <asm/context.h>
#include <inst_ex_test.h>

####LEAF(n58_add_ex_test)
    .globl n58_add_ex_test
n58_add_ex_test:
    .set noreorder
    li  a0, 0x3A
###test inst
    TEST_ADD_EX(0x5afb47da, 0x6c8829f0, 0x7f490b93, 0x5afb47da)
    TEST_ADD_EX(0x1a376500, 0x2a3ca166, 0x797f30b9, 0x1a376500)
    TEST_ADD_EX(0x57b9e040, 0x805413c0, 0xdea0e60a, 0x57b9e040)
    TEST_ADD_EX(0x201345c8, 0xcdb7b5d7, 0x96992440, 0x201345c8)
    TEST_ADD_EX(0xb7970040, 0x28bad3aa, 0x7efc6380, 0xb7970040)
    TEST_ADD_EX(0xb6f7d8ee, 0x9414f228, 0xa93e1e2c, 0xb6f7d8ee)
    TEST_ADD_EX(0xcbf98ef6, 0x924af510, 0xeca83800, 0xcbf98ef6)
    TEST_ADD_EX(0xb77ba8be, 0xb0e6e640, 0x91ed2798, 0xb77ba8be)
    TEST_ADD_EX(0x54b30de8, 0x9e63aee0, 0xb73c06e0, 0x54b30de8)
    TEST_ADD_EX(0xf8315a37, 0x4aacef08, 0x358e44d5, 0xf8315a37)
    TEST_ADD_EX(0x3fc5f140, 0xa41f9ce8, 0xced3ee78, 0x3fc5f140)
    TEST_ADD_EX(0x581761b8, 0x66c5afe0, 0x7aed9464, 0x581761b8)
    TEST_ADD_EX(0x4de06530, 0x883c05bd, 0xc0c909c6, 0x4de06530)
    TEST_ADD_EX(0x73b2cf92, 0x90a5f39c, 0xd42179e0, 0x73b2cf92)
    TEST_ADD_EX(0x0580ff83, 0x6f5f1fbc, 0x2f738fa8, 0x0580ff83)
    TEST_ADD_EX(0x89a0a980, 0x474db690, 0x4d4cbef8, 0x89a0a980)
    TEST_ADD_EX(0x0f29c5e0, 0x6818e272, 0x6f6d2620, 0x0f29c5e0)
    TEST_ADD_EX(0xa417fbd0, 0xf25f8690, 0x8bd5dc00, 0xa417fbd0)
    TEST_ADD_EX(0x9ddbf9de, 0x5c71ab68, 0x5ded26b7, 0x9ddbf9de)
    TEST_ADD_EX(0x7e5142ea, 0x9207edaf, 0x9ff70ca0, 0x7e5142ea)
    TEST_ADD_EX(0xc23fa220, 0x66c13285, 0x62e6a232, 0xc23fa220)
    TEST_ADD_EX(0x10c04730, 0x3eb86080, 0x6d13e968, 0x10c04730)
    TEST_ADD_EX(0x3d968bd0, 0x715979e0, 0x3c4225a8, 0x3d968bd0)
    TEST_ADD_EX(0x2ffed6dc, 0x2b69556c, 0x6126f0bc, 0x2ffed6dc)
    TEST_ADD_EX(0x9b902d80, 0x8b470189, 0xad3b3bf0, 0x9b902d80)
    TEST_ADD_EX(0x182fd44b, 0x7ec1fd50, 0x17915adc, 0x182fd44b)
    TEST_ADD_EX(0x69365359, 0x6f1e0f60, 0x6a965e76, 0x69365359)
    TEST_ADD_EX(0x8ff3b27c, 0xb7d9a76f, 0xa7cff5f3, 0x8ff3b27c)
    TEST_ADD_EX(0x9f1c5870, 0xa7b7a764, 0xc2d61d9c, 0x9f1c5870)
    TEST_ADD_EX(0x28dfb000, 0x92324ebc, 0xa87ab9d0, 0x28dfb000)
    TEST_ADD_EX(0x31e6699f, 0x8a78cc40, 0xab7284da, 0x31e6699f)
    TEST_ADD_EX(0x2056d57e, 0xda3a9e4d, 0x83c85ffc, 0x2056d57e)
    TEST_ADD_EX(0xda5a7118, 0x99cca31f, 0x8984c900, 0xda5a7118)
    TEST_ADD_EX(0x14690a6b, 0xc0ff24b0, 0x8d5614c2, 0x14690a6b)
    TEST_ADD_EX(0xdf377e47, 0x4e88625a, 0x789fd3c0, 0xdf377e47)
    TEST_ADD_EX(0x1dc42f20, 0x45bfade4, 0x7f4b29d1, 0x1dc42f20)
    TEST_ADD_EX(0x80b2fd24, 0x971ee968, 0xd15f6fc8, 0x80b2fd24)
    TEST_ADD_EX(0xc1d4242e, 0xae64d400, 0xca89c824, 0xc1d4242e)
    TEST_ADD_EX(0x70c00360, 0x93eff0e0, 0xe90de540, 0x70c00360)
    TEST_ADD_EX(0x445f5ac0, 0xc430fd60, 0x8061c430, 0x445f5ac0)
    TEST_ADD_EX(0x08867a70, 0xb4cda0f0, 0xae93e5dc, 0x08867a70)
    TEST_ADD_EX(0x6ba62f10, 0xa6c07250, 0xadbb84d2, 0x6ba62f10)
    TEST_ADD_EX(0xc8ca9c54, 0x90bc9b00, 0xe827414c, 0xc8ca9c54)
    TEST_ADD_EX(0xcf5a69a0, 0x68c44320, 0x5f8324e0, 0xcf5a69a0)
    TEST_ADD_EX(0xcc6c38be, 0xb932b6d2, 0x9e42ed6c, 0xcc6c38be)
    TEST_ADD_EX(0x5e5952f4, 0xcb2eee91, 0xb4615df0, 0x5e5952f4)
    TEST_ADD_EX(0xb59c8b00, 0x85552398, 0x857f364f, 0xb59c8b00)
    TEST_ADD_EX(0x4c2e45fe, 0x2fece48f, 0x693adab7, 0x4c2e45fe)
    TEST_ADD_EX(0xbc572030, 0x358d0fe4, 0x63930092, 0xbc572030)
    TEST_ADD_EX(0xf3750460, 0xdd118380, 0x85ee9fe6, 0xf3750460)
    TEST_ADD_EX(0x86f6765c, 0x978c5d9c, 0xd2b76ac8, 0x86f6765c)
    TEST_ADD_EX(0x758b3a34, 0x39ef382c, 0x74480400, 0x758b3a34)
    TEST_ADD_EX(0xf3709640, 0xba034f60, 0xb615fd67, 0xf3709640)

###detect exception
###score ++
    addiu s3, s3, 1
###output a0|s3
inst_error:  
    sw s3, 0($23)
    sw a0, 0(s1)
    jr ra
    nop
####END(n58_add_ex_test)
